package com.imooc.oauth2.server.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.imooc.commons.model.pojo.Diners;

/**
 * \* @author: bear
 * \* Date: 2021-07-11-15:29
 * \* describe:
 */
public interface DinersMapper {

	// 根据用户名 or 手机号 or 邮箱查询用户信息
	// @Select("select id, username, nickname, phone, email, " +
	// 		"password, avatar_url, roles, is_valid from t_diners where " +
	// 		"(username = #{account} or phone = #{account} or email = #{account})")
	@Select("select * from t_diners where (username = #{account} or"+
	" phone =#{account} or email =#{account})")
	Diners selectByAccountInfo(@Param("account") String account);
}
